package o;

import com.huawei.hms.support.api.entity.core.JosStatusCodes;

public final class aed {
    private static final String[] ʻ = new String[]{"audio/mpeg-L1", "audio/mpeg-L2", "audio/mpeg"};
    private static final int[] ʽ = new int[]{44100, 48000, 32000};
    private static final int[] ˊॱ = new int[]{32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000};
    private static final int[] ˋॱ = new int[]{JosStatusCodes.RTN_CODE_COMMON_ERROR, 16000, 24000, 32000, 40000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000};
    private static final int[] ˏॱ = new int[]{32000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 160000, 192000, 224000, 256000, 320000, 384000};
    private static final int[] ॱˊ = new int[]{32000, 48000, 56000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 176000, 192000, 224000, 256000};
    private static final int[] ॱॱ = new int[]{32000, 64000, 96000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 352000, 384000, 416000, 448000};
    public int ʼ;
    public int ˊ;
    public int ˋ;
    public int ˎ;
    public String ˏ;
    public int ॱ;
    public int ᐝ;

    public static int ˊ(int i) {
        if ((i & -2097152) != -2097152) {
            return -1;
        }
        int i2 = (i >>> 19) & 3;
        if (i2 == 1) {
            return -1;
        }
        int i3 = (i >>> 17) & 3;
        if (i3 == 0) {
            return -1;
        }
        int i4 = (i >>> 12) & 15;
        if (i4 == 0 || i4 == 15) {
            return -1;
        }
        int i5 = (i >>> 10) & 3;
        if (i5 == 3) {
            return -1;
        }
        int i6 = ʽ[i5];
        if (i2 == 2) {
            i5 = i6 / 2;
        } else if (i2 == 0) {
            i5 = i6 / 4;
        } else {
            i5 = i6;
        }
        int i7 = (i >>> 9) & 1;
        if (i3 == 3) {
            return ((((i2 == 3 ? ॱॱ[i4 - 1] : ॱˊ[i4 - 1]) * 12) / i5) + i7) * 4;
        }
        if (i2 == 3) {
            i4 = i3 == 2 ? ˏॱ[i4 - 1] : ˊॱ[i4 - 1];
        } else {
            i4 = ˋॱ[i4 - 1];
        }
        if (i2 == 3) {
            return ((i4 * 144) / i5) + i7;
        }
        return (((i3 == 1 ? 72 : 144) * i4) / i5) + i7;
    }

    public static boolean ˋ(int i, aed o_aed) {
        int i2 = 2;
        if ((i & -2097152) != -2097152) {
            return false;
        }
        int i3 = (i >>> 19) & 3;
        if (i3 == 1) {
            return false;
        }
        int i4 = (i >>> 17) & 3;
        if (i4 == 0) {
            return false;
        }
        int i5 = (i >>> 12) & 15;
        if (i5 == 0 || i5 == 15) {
            return false;
        }
        int i6 = (i >>> 10) & 3;
        if (i6 == 3) {
            return false;
        }
        int i7;
        i6 = ʽ[i6];
        if (i3 == 2) {
            i6 /= 2;
        } else if (i3 == 0) {
            i6 /= 4;
        }
        int i8 = (i >>> 9) & 1;
        if (i4 == 3) {
            i5 = ((((i3 == 3 ? ॱॱ[i5 - 1] : ॱˊ[i5 - 1]) * 12) / i6) + i8) * 4;
            i7 = 384;
        } else if (i3 == 3) {
            i7 = 1152;
            i5 = (((i4 == 2 ? ˏॱ[i5 - 1] : ˊॱ[i5 - 1]) * 144) / i6) + i8;
        } else {
            i5 = ˋॱ[i5 - 1];
            i7 = i4 == 1 ? 576 : 1152;
            i5 = (((i4 == 1 ? 72 : 144) * i5) / i6) + i8;
        }
        i8 = ((i5 * 8) * i6) / i7;
        String str = ʻ[3 - i4];
        if (((i >> 6) & 3) == 3) {
            i2 = 1;
        }
        o_aed.ॱ(i3, str, i5, i6, i2, i8, i7);
        return true;
    }

    private void ॱ(int i, String str, int i2, int i3, int i4, int i5, int i6) {
        this.ˎ = i;
        this.ˏ = str;
        this.ॱ = i2;
        this.ˊ = i3;
        this.ˋ = i4;
        this.ʼ = i5;
        this.ᐝ = i6;
    }
}
